Contents | Index | < Browse | Browse >

LETTERstrcspnULETTER Counts the number of characters not in a specific character sequence.

Overview
#include <string.h>

index = strcspn(s,chars);

size_t r;
const char *s;
const char *chars;

Portability
ANSI

Description
This function returns the position of the first occurance of a character, which exists in "chars", in "s". That is, it returns the number of characters at the beginning of a string, which can not also be found in "chars".

Returns
The first position or "s"'s length.